Background subtraction of a video means separating foreground and background objects in the video from each other. At present, there are two main types of videos, i.e., videos with the static image background, and videos with continuous background changes. Videos with the static image background mainly include videos recorded with a fixed camera, such as surveillance videos and the like. Videos with continuous background changes mainly include TV programs, Digital Video Recorder (DVR) videos and the like. The present invention is mainly directed against those videos of the first type, i.e., videos with the static image background. The most extensive application of such videos is surveillance videos that are widespread around streets and alleyways, elevators and crossroads. Due to being recorded for 24 hours, they may have an extremely large data size, but there may be only very little useful information therein. Therefore, video background subtraction has always been a very critical step in the field of video analysis.
The following are several main methods in the prior art.
I. Method based on the frame difference method. This method is the simplest one, in which the presence of a foreground object is determined by comparing a previous frame and a next frame to identify a difference therebetween. Thus, the biggest problem of the frame difference method is distinction between a background updating approach and the difference between the previous frame and the next frame. There is rarely an algorithm that can achieve an excellent effect only by using the frame difference method.II. Method based on a Gaussian mixture model. This method, proposed in the 1990s, involves modeling each pixel point by means of a Gaussian mixture model, updating models online by using the expectation maximization algorithm, and finally, comparing the current pixel with the models to identify differences therebetween so as to determine whether the pixel is a foreground. The method has the disadvantage of heavy calculation burden due to respective modeling of three channels of each pixel and thus can hardly adapt to increasing image size at present.III. Method based on a random process. In the early 21st century, a scholar proposed a method based on random sampling. Specifically, pixels in each frame are randomly sampled as the background and the background is updated randomly. Such an algorithm can produce a good effect by means of the idea of random process, but can still be improved.